package org.eclipse.refactoring;

/**
 * Title:     botton
 * Copyright: Copyright (c) 2011
 * Company:   botton
 * @author    Luiz Botton (lbotton@gmail.com); Netally Santos (snetally@gmail.com>)
 * @version   1
 * Created on 05/2010
 */

import java.util.Map;

import org.eclipse.ltk.core.refactoring.RefactoringContribution;
import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;

public class SingletonRefactoringContribution extends RefactoringContribution {

	@Override
	public RefactoringDescriptor createDescriptor(String id, String project, String description, String comment, Map arguments, int flags) {
		return new SingletonDescriptor(project, description, comment, arguments);
	}

	@Override
	public Map retrieveArgumentMap(RefactoringDescriptor descriptor) {
		if (descriptor instanceof SingletonDescriptor)
			return ((SingletonDescriptor) descriptor).getArguments();
		return super.retrieveArgumentMap(descriptor);
	}
}